#include <bits/stdc++.h>

using i64 = long long;

int main()
{
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    std::cout.tie(0);

    int tt;
    std::cin >> tt;

    while (tt--)
    {
        int n, m, f = 1;
        std::cin >> n >> m;

        std::vector<int> a(n), b(m);
        for (int i = 0; i < n; i++)
        {
            std::cin >> a[i];
        }
        for (int i = 0; i < m; i++)
        {
            std::cin >> b[i];
        }

        for (int i = 0; i < n; i++)
        {
            if (i == 0)
            {
                a[i] = std::min(a[i], b[0] - a[i]);
            }
            else
            {
                int minn = std::min(a[i], b[0] - a[i]), maxn = std::max(a[i], b[0] - a[i]);
                if (minn >= a[i - 1])
                {
                    a[i] = minn;
                }
                else if (maxn >= a[i - 1])
                {
                    a[i] = maxn;
                }
                else
                {
                    f = 0;
                    break;
                }
            }
        }

        if (f)
        {
            std::cout << "YES\n";
        }
        else
        {
            std::cout << "NO\n";
        }
    }
}
